package com.basics.channel.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.basics.api.response.channel.ChannelMsgListData;
import com.basics.api.response.channel.PostOrMsgData;
import com.basics.channel.entity.CyChannelMsg;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 频道消息 Mapper 接口
 * </p>
 *
 * @author WangWei
 * @since 2025-03-09
 */
public interface CyChannelMsgMapper extends BaseMapper<CyChannelMsg> {

    PostOrMsgData getLastMsg(@Param("channelId") Long channelId, @Param("userId")Long userId);

    IPage<ChannelMsgListData> selectChannelMsgList(IPage<ChannelMsgListData> page, @Param("channelId") Long channelId, @Param("userId")Long userId);
}
